#pragma once
#include <string>
#include <vector>

#include "utils/Dynamic.h"

namespace jsiexecutor {
enum MethodType { SYNC, ASYNC };
struct MethodDescriptor {
  std::string name;
  MethodType type;
  MethodDescriptor(std::string name, MethodType type) : name(name), type(type) {}
};

class NativeModule {
 public:
  virtual ~NativeModule() = default;
  virtual std::string getName() = 0;
  virtual std::vector<MethodDescriptor> getMethods() = 0;
  virtual Dynamic getConstants() = 0;
  virtual void invokeSync(unsigned int methodId, std::vector<Dynamic>& args) = 0;
  virtual void invokeAsync(unsigned int methodId, std::vector<Dynamic>& args, unsigned int callbackId) = 0;
};
}  // namespace jsiexecutor
